package com.kateba.android.utils;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;


public class CustomAdapter extends BaseAdapter
{
  private Context context;
  private List<ListViewItem> deviceList;

  public CustomAdapter(Context paramContext, List<ListViewItem> paramList)
  {
    this.context = paramContext;
    this.deviceList = paramList;
  }

  public int getCount()
  {
    return this.deviceList.size();
  }

  public Object getItem(int paramInt)
  {
    return this.deviceList.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ListViewItem localListViewItem = (ListViewItem)this.deviceList.get(paramInt);
    CustomAdapterView localCustomAdapterView = new CustomAdapterView(this.context, localListViewItem);
    localCustomAdapterView.setOnClickListener((View.OnClickListener)this.context);
    return localCustomAdapterView;
  }
}